6 A new feature in Windows 10 allows any developer to quickly and easily run an entire linux subsystem in windows and access it via a bash terminal. This gives developers full use of the entire linux OS and all of the great existing linux tools and programs. When Bash for Windows is up and running it feels like you sshed into a full linux box, except the linux distro is actually running alongside windows locally.
8 If you use Bash on Windows you can easily build u360gts exactly as you would for Ubuntu. (the linux distro running on Windows is Ubuntu Trusty)
10 Setup for Bash on Windows is very easy and takes less than 5 minutes. [For instructions follow the official guide here.](https://msdn.microsoft.com/commandline/wsl/install_guide)
12 Once you have Bash On Windows running you can follow the "Building in Ubuntu" instructions for building cleanfight.
16 download the Setup*.exe from https://www.cygwin.com/
18 ![Cygwin Installation](assets/001.cygwin_dl.png)
20 Execute the download Setup and step through the installation wizard (no need to customize the settings here). Stop at the "Select Packages" Screen and select the following Packages
24 - Devel/bash-completion (was git-completion, Optional)
28 - Editors/vim-common (Optional)
29 - Shells/mintty (should be already selected)
31 ![Cygwin Installation](assets/002.cygwin_setup.png)
33 ![Cygwin Installation](assets/003.cygwin_setup.png)
35 ![Cygwin Installation](assets/004.cygwin_setup.png)
37 ![Cygwin Installation](assets/005.cygwin_setup.png)
39 ![Cygwin Installation](assets/006.cygwin_setup.png)
42 Continue with the Installation and accept all autodetected dependencies.
44 ![Cygwin Installation](assets/007.cygwin_setup.png)
47 ##Setup GNU ARM Toolchain
51 versions do matter, 5.4 is known to work well. Download this version from https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q2-update/+download/gcc-arm-none-eabi-5_4-2016q2-20160622-win32.zip
54 Extract the contents of this archive to any folder of your choice, for instance ```C:\dev\gcc-arm```.
56 ![GNU ARM Toolchain Setup](assets/008.toolchain.png)
58 add the "bin" subdirectory to the PATH Windows environment variable: ```%PATH%;C:\dev\gcc-arm\bin```
60 ![GNU ARM Toolchain Setup](assets/009.toolchain_path.png)
62 ![GNU ARM Toolchain Setup](assets/010.toolchain_path.png)
64 ## Checkout and compile u360gts
66 Head over to the u360gts Github page and grab the URL of the GIT Repository: "https://github.com/u360gts/u360gts.git"
68 Open the Cygwin-Terminal, navigate to your development folder and use the git commandline to checkout the repository:
72 git clone https://github.com/u360gts/u360gts.git
74 ![GIT Checkout](assets/011.git_checkout.png)
76 ![GIT Checkout](assets/012.git_checkout.png)
78 To compile your u360gts binaries, enter the u360gts directory and build the project using the make command. You can append TARGET=[HARDWARE] if you want to build anything other than the default NAZE target:
85 ![GIT Checkout](assets/013.compile.png)
87 within few moments you should have your binary ready:
91 arm-none-eabi-size ./obj/main/u360gts_NAZE.elf
92 text data bss dec hex filename
93 95388 308 10980 106676 1a0b4 ./obj/main/u360gts_NAZE.elf
94 arm-none-eabi-objcopy -O ihex --set-start 0x8000000 obj/main/u360gts_NAZE.elf obj/u360gts_NAZE.hex
97 You can use the u360gts-Configurator to flash the ```obj/u360gts_NAZE.hex``` file.
99 ## Updating and rebuilding
101 Navigate to the local u360gts repository and use the following steps to pull the latest changes and rebuild your version of u360gts:
104 cd /cygdrive/c/dev/u360gts
107 make clean TARGET=NAZE -j16 -l
111 You may want to remove -j16 -l if your having a hard time narrowing down errors. It does multithreaded make, however it makes it harder to know which warning or error comes from which file.